//
//  AsNetworkClient.h
//  shopcity
//
//  Created by huangbenhua on 15-3-11.
//  Copyright (c) 2015年 laohuang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JKRemoteResult.h"
#import "JKResult.h"

#define kUserDefaultHttpCookies @"http_cookies"
#define kUploadParamName @"name"
#define kUploadParamFileName @"fileName"
#define kUploadParamMimeType @"mimeType"


@interface JKHttpClient : NSObject

-(instancetype)init;

-(id)upload:(NSString*)path
     data:(NSData*)data
     params:(NSDictionary *)params
     result:(void(^)(JKResponse* resp))result;

-(id)post:(NSString*)path
   params:(id)params
   result:(void(^)(JKResponse* resp))result;

-(id)get:(NSString*)path
  params:(id)params
  result:(void(^)(JKResponse* resp))result;

-(id)get:(NSString*)path
  result:(void(^)(JKResponse* resp))result;

-(BOOL)isRunning;

-(BOOL)cancel:(NSString*)url;

-(void)cancelAll;

-(BOOL)close:(id)handler;

- (void)showNetUnReachableToast;
- (void)showMaskWithMessage:(NSString *)message;

@end
